import { PrismaClient } from '@prisma/client'

const prisma = new PrismaClient()

async function checkConfigTable() {
  try {
    const count = await prisma.app_config.count()
    console.log('配置表记录数:', count)

    if (count > 0) {
      const configs = await prisma.app_config.findMany({ take: 10 })
      console.log('前10条配置:')
      configs.forEach((c) => {
        console.log(`- ${c.config_key}: ${c.config_value} (${c.config_type})`)
      })
    }
  }
  catch (error) {
    console.error('检查配置表失败:', error)
  }
  finally {
    await prisma.$disconnect()
  }
}

checkConfigTable()
